﻿using FreeSql.DataAnnotations;
using KrasDD.Attributes;

namespace KrasDD.Models
{
    [
        JsonObject(MemberSerialization.OptIn),
        Table(Name = "[innovator].[USER]", DisableSyncStructure = false)
    ]
    [ItemType("2F83A1B4C5D6E7F8A9B0C1D2E3F4A5B6", "USER")]
    public partial class USER : AppBaseEntity
    {
        [JsonProperty, Column(StringLength = 32)]
        public string CELL { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string COMPANY_NAME { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string DEFAULT_VAULT { get; set; } = "67BBB9204FE84A8981ED8313049BA06C";

        [JsonProperty, Column(StringLength = 64)]
        public string EMAIL { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string ESIGNATURE { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string FAX { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string FIRST_NAME { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string HOME_PHONE { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string LABEL { get; set; }

        [JsonProperty]
        public DateTime? LAST_LOGIN_DATE { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string LAST_NAME { get; set; }

        [JsonProperty, Column(StringLength = 32, IsNullable = false)]
        public string LOGIN_NAME { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool LOGON_ENABLED { get; set; }

        [JsonProperty, Column(StringLength = 16)]
        public string MAIL_STOP { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string MANAGER { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string PAGER { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string PASSWORD { get; set; }

        [JsonProperty, Column(StringLength = 128)]
        public string PICTURE { get; set; }

        [JsonProperty]
        public DateTime? PWD_IS_SET_ON { get; set; }

        [JsonProperty, Column(StringLength = 64)]
        public string STARTING_PAGE { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string TELEPHONE { get; set; }

        [JsonProperty, Column(StringLength = 15)]
        public string USER_NO { get; set; }

        [JsonProperty, Column(StringLength = 256)]
        public string WORKING_DIRECTORY { get; set; }

        #region 外键 => 导航属性，OneToMany

        [Navigate("SOURCE_ID")]
        public virtual List<ALIAS> ALIASs { get; set; }

        #endregion
    }
}
